<?php

namespace App\Http\Controllers\Api;

use App\Base\BaseController;
use App\Helper\AlgorithmHelper;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Http\Request;

//use Illuminate\Routing\Controller as BaseController;

class AlgorithmController extends BaseController
{
    public function test(Request $request)
    {
//        $nums = [0,0,1,1,1,1,2,3,3];
//        $test = AlgorithmHelper::removeDuplicates($nums);

        // 1.两数之和
        // $nums = [2,7,11,15];$target = 9;
//        $nums = [3,2,4]; $target = 6;
//        $test = AlgorithmHelper::twoSum($nums, $target);

        $s1 = "great"; $s2 = "rgeat";
        $test = AlgorithmHelper::isScramble($s1, $s2);
        dd($test);
    }
}
